#ifndef CAN_H
#define CAN_H

#include <php.h>
#define CAN_TYPE_STANDARD  0
#define CAN_TYPE_EXTEND 1
#define SYSTEM_CMD_STR_LEN 128


ZEND_BEGIN_ARG_INFO(arginfo_can_init, 0)
    ZEND_ARG_INFO(0, can_device)
    ZEND_ARG_INFO(0, bitrate)
ZEND_END_ARG_INFO()


ZEND_BEGIN_ARG_INFO(arginfo_can_open, 0)
    ZEND_ARG_INFO(0, can_device)
ZEND_END_ARG_INFO()


ZEND_BEGIN_ARG_INFO(arginfo_can_send, 0)
    ZEND_ARG_INFO(0, socket_id)
    ZEND_ARG_INFO(0, can_id)
    ZEND_ARG_INFO(0, can_id_type)
    ZEND_ARG_INFO(0, can_data)
ZEND_END_ARG_INFO()


ZEND_BEGIN_ARG_INFO(arginfo_can_read, 0)
    ZEND_ARG_INFO(0, socket_id)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_can_close, 0)
    ZEND_ARG_INFO(0, socket_id)
ZEND_END_ARG_INFO()


ZEND_BEGIN_ARG_INFO(arginfo_can_uninit, 0)
    ZEND_ARG_INFO(0, can_device)
ZEND_END_ARG_INFO()


void can_minit(int module_number);


PHP_FUNCTION(can_init);
PHP_FUNCTION(can_open);


PHP_FUNCTION(can_send);
PHP_FUNCTION(can_read);
PHP_FUNCTION(can_close);

PHP_FUNCTION(can_uninit);


#endif
